//Radar Installation
#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
const int N = 1e3 + 10;
struct node
{
	double l,r;
}a[N];

bool cmp(node& x,node& y)
{
	return x.l < y.l;
}
int main()
{
	int n,d;
	int cnt = 0;
	while(cin >> n >> d , n != 0 && d!=0)
	{
		cnt++;
		bool flag = false;
		for(int i = 1; i <= n; i++)
		{
			double x , y;
			cin >> x >> y;
			if(y > d) flag = true;
			
			double l = sqrt(d * d - y * y);
			a[i].l = x - l,a[i].r = x + l;
		}
		cout << "Case " << cnt << ": ";
		if(flag) cout << -1 << endl;
		else
		{
			sort(a + 1, a + n + 1,cmp);
			int ret = 1;
			double t = a[1].r;
			for(int i = 2; i <= n; i++)
			{
				double left = a[i].l , right = a[i].r;
				if(t >= left) 
				{
					t = min(t,right);
				}
				else
				{
					ret++;
					t = right;
				}
			}
			cout << ret << endl;
		}
		
	}
	return 0;
}
